package org.correct.link;

import java.util.ArrayList;

public class Utility {
	public static ArrayList<String> split(String str, char delimiter) {
		byte[] bstr = str.getBytes();
		ArrayList<String> slist = new ArrayList<String>();
		int last = -1;
		for(int i = 0; i < bstr.length; i++) {
			if(bstr[i] == delimiter) {
				if(last < i - 1) {
					slist.add(str.substring(last + 1, i));
				}
				last = i;
			}
		}
		if(last < bstr.length - 1)
			slist.add(str.substring(last + 1, bstr.length));
		return slist;
	}
}
